<?php 
	echo $this->headScript()->appendFile($this->basePath() . '/js/ckeditor/ckeditor.js');
	$form = $this->form;
	
	$form->prepare();
	
	$form->setAttribute('method', 'post');
	
?>
<div class="row">
    <div class="col-lg-12">
        <h1 class="page-header">Đăng sản phẩm : Bước 1</h1>
    </div>
    <!-- /.col-lg-12 -->
</div>
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-green">
            <div class="panel-heading">
                Thông tin chính về sản phẩm
            </div>
            <div class="panel-body">
                <div class="row">
                	<?php echo $this->form()->openTag($form);?>
                        <div class="col-lg-8">
                                <div class="form-group">
                                    <?php echo $this->formLabel($form->get('title'));?>
                                    <?php echo $this->formElement($form->get('title'));?>
                                    <?php echo $this->formElementErrors($form->get('title'));?>
                                    <p class="help-block">Tên không vượt quá 255 ký tự</p>
                                </div>
                                <div class="row">
	                                <div class="col-lg-6">
		                                <div class="form-group">
		                                		<lable>Thể loại</lable>
		                                		<input type="text" class="form-control col-lg-4"/>
		                                </div>
	                                </div>
	                                <div class="col-lg-4">
		                                <div class="form-group">
		                                		<lable>Thương hiệu</lable>
		                                		<input type="text" class="form-control col-lg-4"/>
		                                </div>
	                                </div>
	                                <div class="col-lg-2">
		                                <div class="form-group">
		                                		<lable>Khuyết mại</lable>
		                                		<input type="text" class="form-control col-lg-4"/>
		                                </div>
	                                </div>
	                                
                                </div>
                                <div class="form-group">
                                    <?php echo $this->formLabel($form->get('des_short'));?>
                                    <?php echo $this->formElement($form->get('des_short'));?>
                                    <?php echo $this->formElementErrors($form->get('des_short'));?>
                                </div>
                                <div class="form-group">
                                    <?php echo $this->formLabel($form->get('description'));?>
                                    <?php echo $this->formElement($form->get('description'));?>
                                    <script type="text/javascript">
							            CKEDITOR.replace( 'description' );
							        </script>
                                    
                                    <?php echo $this->formElementErrors($form->get('description'));?>
                                </div>
                                

                        </div>
                        <!-- /.col-lg-8 (nested) -->
                        <div class="col-lg-4">
                            <div class="form-group">
                                <?php echo $this->formLabel($form->get('price')); ?>
                                <div class="input-group col-lg-6">
                                    <span class="input-group-addon">$</span>
                                    <?php echo $this->formElement($form->get('price')); ?>
                                    <span class="input-group-addon">VNĐ</span>
                                </div>
                                <?php echo $this->formElementErrors($form->get('price')); ?>
                                <p class="help-block">Giá bán không vượt quá 1.000.000.000 VNĐ</p>
                            </div>
                            <div class="form-group">
                                <?php echo $this->formLabel($form->get('thumbnail')); ?>
                                <?php echo $this->formElement($form->get('thumbnail')); ?>
                                <input type="file" style="display: none;">
                                <style>
                                	.thumbnail {
                                		width: 100%;
                                		height: 393px;
                                		display: block;
                                		background-color: #eeeeee;
                                		vertical-align: middle;
                                		text-align: center;
                                	}
                                </style>
                                <a href="javascript:void()" class="upload-thumbnail">
                                	<div class="thumbnail" ></div>
                                </a>
                                <?php echo $this->formElementErrors($form->get('thumbnail'));?>
                                <p class="help-block">Nên sử dụng ảnh hình vuông để hiển thị được đẹp nhất.</p>
                            </div>
                        </div>
                        <!-- /.col-lg-4 (nested) -->
                        <div class="col-lg-12">
                        <button type="submit" class="col-lg-offset-11 btn btn-success">Hoàn tất</button>
                        </div>
                    <?php echo $this->form()->closeTag();?>
                </div>
                <!-- /.row (nested) -->
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div>
    <!-- /.col-lg-12 -->
</div>